// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

pub mod dlp_service {
    use crate::Result;

    /// A builder for [DlpService][crate::client::DlpService].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_privacy_dlp_v2::*;
    /// # use builder::dlp_service::ClientBuilder;
    /// # use client::DlpService;
    /// let builder : ClientBuilder = DlpService::builder();
    /// let client = builder
    ///     .with_endpoint("https://dlp.googleapis.com")
    ///     .build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub type ClientBuilder =
        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;

    pub(crate) mod client {
        use super::super::super::client::DlpService;
        pub struct Factory;
        impl gax::client_builder::internal::ClientFactory for Factory {
            type Client = DlpService;
            type Credentials = gaxi::options::Credentials;
            async fn build(
                self,
                config: gaxi::options::ClientConfig,
            ) -> gax::client_builder::Result<Self::Client> {
                Self::Client::new(config).await
            }
        }
    }

    /// Common implementation for [crate::client::DlpService] request builders.
    #[derive(Clone, Debug)]
    pub(crate) struct RequestBuilder<R: std::default::Default> {
        stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        request: R,
        options: gax::options::RequestOptions,
    }

    impl<R> RequestBuilder<R>
    where
        R: std::default::Default,
    {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self {
                stub,
                request: R::default(),
                options: gax::options::RequestOptions::default(),
            }
        }
    }

    /// The request builder for [DlpService::inspect_content][crate::client::DlpService::inspect_content] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::InspectContent;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> InspectContent {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct InspectContent(RequestBuilder<crate::model::InspectContentRequest>);

    impl InspectContent {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::InspectContentRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::InspectContentResponse> {
            (*self.0.stub)
                .inspect_content(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::InspectContentRequest::parent].
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [inspect_config][crate::model::InspectContentRequest::inspect_config].
        pub fn set_inspect_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_config][crate::model::InspectContentRequest::inspect_config].
        pub fn set_or_clear_inspect_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [item][crate::model::InspectContentRequest::item].
        pub fn set_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [item][crate::model::InspectContentRequest::item].
        pub fn set_or_clear_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_template_name][crate::model::InspectContentRequest::inspect_template_name].
        pub fn set_inspect_template_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.inspect_template_name = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::InspectContentRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for InspectContent {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::redact_image][crate::client::DlpService::redact_image] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::RedactImage;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> RedactImage {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct RedactImage(RequestBuilder<crate::model::RedactImageRequest>);

    impl RedactImage {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::RedactImageRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::RedactImageResponse> {
            (*self.0.stub)
                .redact_image(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::RedactImageRequest::parent].
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::RedactImageRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }

        /// Sets the value of [inspect_config][crate::model::RedactImageRequest::inspect_config].
        pub fn set_inspect_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_config][crate::model::RedactImageRequest::inspect_config].
        pub fn set_or_clear_inspect_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [image_redaction_configs][crate::model::RedactImageRequest::image_redaction_configs].
        pub fn set_image_redaction_configs<T, V>(mut self, v: T) -> Self
        where
            T: std::iter::IntoIterator<Item = V>,
            V: std::convert::Into<crate::model::redact_image_request::ImageRedactionConfig>,
        {
            use std::iter::Iterator;
            self.0.request.image_redaction_configs = v.into_iter().map(|i| i.into()).collect();
            self
        }

        /// Sets the value of [include_findings][crate::model::RedactImageRequest::include_findings].
        pub fn set_include_findings<T: Into<bool>>(mut self, v: T) -> Self {
            self.0.request.include_findings = v.into();
            self
        }

        /// Sets the value of [byte_item][crate::model::RedactImageRequest::byte_item].
        pub fn set_byte_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::ByteContentItem>,
        {
            self.0.request.byte_item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [byte_item][crate::model::RedactImageRequest::byte_item].
        pub fn set_or_clear_byte_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::ByteContentItem>,
        {
            self.0.request.byte_item = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_template][crate::model::RedactImageRequest::inspect_template].
        pub fn set_inspect_template<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.inspect_template = v.into();
            self
        }

        /// Sets the value of [deidentify_template][crate::model::RedactImageRequest::deidentify_template].
        pub fn set_deidentify_template<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.deidentify_template = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for RedactImage {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::deidentify_content][crate::client::DlpService::deidentify_content] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeidentifyContent;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeidentifyContent {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeidentifyContent(RequestBuilder<crate::model::DeidentifyContentRequest>);

    impl DeidentifyContent {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeidentifyContentRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DeidentifyContentResponse> {
            (*self.0.stub)
                .deidentify_content(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::DeidentifyContentRequest::parent].
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [deidentify_config][crate::model::DeidentifyContentRequest::deidentify_config].
        pub fn set_deidentify_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyConfig>,
        {
            self.0.request.deidentify_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [deidentify_config][crate::model::DeidentifyContentRequest::deidentify_config].
        pub fn set_or_clear_deidentify_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyConfig>,
        {
            self.0.request.deidentify_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_config][crate::model::DeidentifyContentRequest::inspect_config].
        pub fn set_inspect_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_config][crate::model::DeidentifyContentRequest::inspect_config].
        pub fn set_or_clear_inspect_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [item][crate::model::DeidentifyContentRequest::item].
        pub fn set_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [item][crate::model::DeidentifyContentRequest::item].
        pub fn set_or_clear_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_template_name][crate::model::DeidentifyContentRequest::inspect_template_name].
        pub fn set_inspect_template_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.inspect_template_name = v.into();
            self
        }

        /// Sets the value of [deidentify_template_name][crate::model::DeidentifyContentRequest::deidentify_template_name].
        pub fn set_deidentify_template_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.deidentify_template_name = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::DeidentifyContentRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeidentifyContent {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::reidentify_content][crate::client::DlpService::reidentify_content] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ReidentifyContent;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ReidentifyContent {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ReidentifyContent(RequestBuilder<crate::model::ReidentifyContentRequest>);

    impl ReidentifyContent {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ReidentifyContentRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ReidentifyContentResponse> {
            (*self.0.stub)
                .reidentify_content(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::ReidentifyContentRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [reidentify_config][crate::model::ReidentifyContentRequest::reidentify_config].
        pub fn set_reidentify_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyConfig>,
        {
            self.0.request.reidentify_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [reidentify_config][crate::model::ReidentifyContentRequest::reidentify_config].
        pub fn set_or_clear_reidentify_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyConfig>,
        {
            self.0.request.reidentify_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_config][crate::model::ReidentifyContentRequest::inspect_config].
        pub fn set_inspect_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_config][crate::model::ReidentifyContentRequest::inspect_config].
        pub fn set_or_clear_inspect_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectConfig>,
        {
            self.0.request.inspect_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [item][crate::model::ReidentifyContentRequest::item].
        pub fn set_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [item][crate::model::ReidentifyContentRequest::item].
        pub fn set_or_clear_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::ContentItem>,
        {
            self.0.request.item = v.map(|x| x.into());
            self
        }

        /// Sets the value of [inspect_template_name][crate::model::ReidentifyContentRequest::inspect_template_name].
        pub fn set_inspect_template_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.inspect_template_name = v.into();
            self
        }

        /// Sets the value of [reidentify_template_name][crate::model::ReidentifyContentRequest::reidentify_template_name].
        pub fn set_reidentify_template_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.reidentify_template_name = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ReidentifyContentRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ReidentifyContent {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_info_types][crate::client::DlpService::list_info_types] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListInfoTypes;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListInfoTypes {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListInfoTypes(RequestBuilder<crate::model::ListInfoTypesRequest>);

    impl ListInfoTypes {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListInfoTypesRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListInfoTypesResponse> {
            (*self.0.stub)
                .list_info_types(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::ListInfoTypesRequest::parent].
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [language_code][crate::model::ListInfoTypesRequest::language_code].
        pub fn set_language_code<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.language_code = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListInfoTypesRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListInfoTypesRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListInfoTypes {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_inspect_template][crate::client::DlpService::create_inspect_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateInspectTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateInspectTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateInspectTemplate(RequestBuilder<crate::model::CreateInspectTemplateRequest>);

    impl CreateInspectTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateInspectTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::InspectTemplate> {
            (*self.0.stub)
                .create_inspect_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateInspectTemplateRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [inspect_template][crate::model::CreateInspectTemplateRequest::inspect_template].
        ///
        /// This is a **required** field for requests.
        pub fn set_inspect_template<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectTemplate>,
        {
            self.0.request.inspect_template = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_template][crate::model::CreateInspectTemplateRequest::inspect_template].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_inspect_template<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectTemplate>,
        {
            self.0.request.inspect_template = v.map(|x| x.into());
            self
        }

        /// Sets the value of [template_id][crate::model::CreateInspectTemplateRequest::template_id].
        pub fn set_template_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.template_id = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::CreateInspectTemplateRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateInspectTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_inspect_template][crate::client::DlpService::update_inspect_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateInspectTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateInspectTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateInspectTemplate(RequestBuilder<crate::model::UpdateInspectTemplateRequest>);

    impl UpdateInspectTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateInspectTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::InspectTemplate> {
            (*self.0.stub)
                .update_inspect_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateInspectTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [inspect_template][crate::model::UpdateInspectTemplateRequest::inspect_template].
        pub fn set_inspect_template<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::InspectTemplate>,
        {
            self.0.request.inspect_template = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [inspect_template][crate::model::UpdateInspectTemplateRequest::inspect_template].
        pub fn set_or_clear_inspect_template<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::InspectTemplate>,
        {
            self.0.request.inspect_template = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateInspectTemplateRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateInspectTemplateRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateInspectTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_inspect_template][crate::client::DlpService::get_inspect_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetInspectTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetInspectTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetInspectTemplate(RequestBuilder<crate::model::GetInspectTemplateRequest>);

    impl GetInspectTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetInspectTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::InspectTemplate> {
            (*self.0.stub)
                .get_inspect_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetInspectTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetInspectTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_inspect_templates][crate::client::DlpService::list_inspect_templates] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListInspectTemplates;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListInspectTemplates {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListInspectTemplates(RequestBuilder<crate::model::ListInspectTemplatesRequest>);

    impl ListInspectTemplates {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListInspectTemplatesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListInspectTemplatesResponse> {
            (*self.0.stub)
                .list_inspect_templates(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListInspectTemplatesResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListInspectTemplatesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListInspectTemplatesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListInspectTemplatesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListInspectTemplatesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListInspectTemplatesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListInspectTemplatesRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListInspectTemplates {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_inspect_template][crate::client::DlpService::delete_inspect_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteInspectTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteInspectTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteInspectTemplate(RequestBuilder<crate::model::DeleteInspectTemplateRequest>);

    impl DeleteInspectTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteInspectTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_inspect_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteInspectTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteInspectTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_deidentify_template][crate::client::DlpService::create_deidentify_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateDeidentifyTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateDeidentifyTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateDeidentifyTemplate(
        RequestBuilder<crate::model::CreateDeidentifyTemplateRequest>,
    );

    impl CreateDeidentifyTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateDeidentifyTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DeidentifyTemplate> {
            (*self.0.stub)
                .create_deidentify_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateDeidentifyTemplateRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [deidentify_template][crate::model::CreateDeidentifyTemplateRequest::deidentify_template].
        ///
        /// This is a **required** field for requests.
        pub fn set_deidentify_template<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyTemplate>,
        {
            self.0.request.deidentify_template = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [deidentify_template][crate::model::CreateDeidentifyTemplateRequest::deidentify_template].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_deidentify_template<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyTemplate>,
        {
            self.0.request.deidentify_template = v.map(|x| x.into());
            self
        }

        /// Sets the value of [template_id][crate::model::CreateDeidentifyTemplateRequest::template_id].
        pub fn set_template_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.template_id = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::CreateDeidentifyTemplateRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateDeidentifyTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_deidentify_template][crate::client::DlpService::update_deidentify_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateDeidentifyTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateDeidentifyTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateDeidentifyTemplate(
        RequestBuilder<crate::model::UpdateDeidentifyTemplateRequest>,
    );

    impl UpdateDeidentifyTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateDeidentifyTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DeidentifyTemplate> {
            (*self.0.stub)
                .update_deidentify_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateDeidentifyTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [deidentify_template][crate::model::UpdateDeidentifyTemplateRequest::deidentify_template].
        pub fn set_deidentify_template<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyTemplate>,
        {
            self.0.request.deidentify_template = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [deidentify_template][crate::model::UpdateDeidentifyTemplateRequest::deidentify_template].
        pub fn set_or_clear_deidentify_template<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DeidentifyTemplate>,
        {
            self.0.request.deidentify_template = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateDeidentifyTemplateRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateDeidentifyTemplateRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateDeidentifyTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_deidentify_template][crate::client::DlpService::get_deidentify_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetDeidentifyTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetDeidentifyTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetDeidentifyTemplate(RequestBuilder<crate::model::GetDeidentifyTemplateRequest>);

    impl GetDeidentifyTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetDeidentifyTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DeidentifyTemplate> {
            (*self.0.stub)
                .get_deidentify_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetDeidentifyTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetDeidentifyTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_deidentify_templates][crate::client::DlpService::list_deidentify_templates] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListDeidentifyTemplates;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListDeidentifyTemplates {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListDeidentifyTemplates(
        RequestBuilder<crate::model::ListDeidentifyTemplatesRequest>,
    );

    impl ListDeidentifyTemplates {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListDeidentifyTemplatesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListDeidentifyTemplatesResponse> {
            (*self.0.stub)
                .list_deidentify_templates(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<
            crate::model::ListDeidentifyTemplatesResponse,
            gax::error::Error,
        > {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListDeidentifyTemplatesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListDeidentifyTemplatesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListDeidentifyTemplatesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListDeidentifyTemplatesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListDeidentifyTemplatesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListDeidentifyTemplatesRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListDeidentifyTemplates {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_deidentify_template][crate::client::DlpService::delete_deidentify_template] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteDeidentifyTemplate;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteDeidentifyTemplate {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteDeidentifyTemplate(
        RequestBuilder<crate::model::DeleteDeidentifyTemplateRequest>,
    );

    impl DeleteDeidentifyTemplate {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteDeidentifyTemplateRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_deidentify_template(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteDeidentifyTemplateRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteDeidentifyTemplate {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_job_trigger][crate::client::DlpService::create_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateJobTrigger(RequestBuilder<crate::model::CreateJobTriggerRequest>);

    impl CreateJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateJobTriggerRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::JobTrigger> {
            (*self.0.stub)
                .create_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateJobTriggerRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [job_trigger][crate::model::CreateJobTriggerRequest::job_trigger].
        ///
        /// This is a **required** field for requests.
        pub fn set_job_trigger<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::JobTrigger>,
        {
            self.0.request.job_trigger = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [job_trigger][crate::model::CreateJobTriggerRequest::job_trigger].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_job_trigger<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::JobTrigger>,
        {
            self.0.request.job_trigger = v.map(|x| x.into());
            self
        }

        /// Sets the value of [trigger_id][crate::model::CreateJobTriggerRequest::trigger_id].
        pub fn set_trigger_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.trigger_id = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::CreateJobTriggerRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_job_trigger][crate::client::DlpService::update_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateJobTrigger(RequestBuilder<crate::model::UpdateJobTriggerRequest>);

    impl UpdateJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateJobTriggerRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::JobTrigger> {
            (*self.0.stub)
                .update_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateJobTriggerRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [job_trigger][crate::model::UpdateJobTriggerRequest::job_trigger].
        pub fn set_job_trigger<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::JobTrigger>,
        {
            self.0.request.job_trigger = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [job_trigger][crate::model::UpdateJobTriggerRequest::job_trigger].
        pub fn set_or_clear_job_trigger<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::JobTrigger>,
        {
            self.0.request.job_trigger = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateJobTriggerRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateJobTriggerRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::hybrid_inspect_job_trigger][crate::client::DlpService::hybrid_inspect_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::HybridInspectJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> HybridInspectJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct HybridInspectJobTrigger(
        RequestBuilder<crate::model::HybridInspectJobTriggerRequest>,
    );

    impl HybridInspectJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::HybridInspectJobTriggerRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::HybridInspectResponse> {
            (*self.0.stub)
                .hybrid_inspect_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::HybridInspectJobTriggerRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [hybrid_item][crate::model::HybridInspectJobTriggerRequest::hybrid_item].
        pub fn set_hybrid_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::HybridContentItem>,
        {
            self.0.request.hybrid_item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [hybrid_item][crate::model::HybridInspectJobTriggerRequest::hybrid_item].
        pub fn set_or_clear_hybrid_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::HybridContentItem>,
        {
            self.0.request.hybrid_item = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for HybridInspectJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_job_trigger][crate::client::DlpService::get_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetJobTrigger(RequestBuilder<crate::model::GetJobTriggerRequest>);

    impl GetJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetJobTriggerRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::JobTrigger> {
            (*self.0.stub)
                .get_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetJobTriggerRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_job_triggers][crate::client::DlpService::list_job_triggers] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListJobTriggers;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListJobTriggers {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListJobTriggers(RequestBuilder<crate::model::ListJobTriggersRequest>);

    impl ListJobTriggers {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListJobTriggersRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListJobTriggersResponse> {
            (*self.0.stub)
                .list_job_triggers(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListJobTriggersResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<crate::model::ListJobTriggersResponse, gax::error::Error>
        {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListJobTriggersRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListJobTriggersRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListJobTriggersRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListJobTriggersRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListJobTriggersRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }

        /// Sets the value of [r#type][crate::model::ListJobTriggersRequest::type].
        pub fn set_type<T: Into<crate::model::DlpJobType>>(mut self, v: T) -> Self {
            self.0.request.r#type = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListJobTriggersRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListJobTriggers {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_job_trigger][crate::client::DlpService::delete_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteJobTrigger(RequestBuilder<crate::model::DeleteJobTriggerRequest>);

    impl DeleteJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteJobTriggerRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteJobTriggerRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::activate_job_trigger][crate::client::DlpService::activate_job_trigger] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ActivateJobTrigger;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ActivateJobTrigger {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ActivateJobTrigger(RequestBuilder<crate::model::ActivateJobTriggerRequest>);

    impl ActivateJobTrigger {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ActivateJobTriggerRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DlpJob> {
            (*self.0.stub)
                .activate_job_trigger(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::ActivateJobTriggerRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ActivateJobTrigger {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_discovery_config][crate::client::DlpService::create_discovery_config] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateDiscoveryConfig;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateDiscoveryConfig {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateDiscoveryConfig(RequestBuilder<crate::model::CreateDiscoveryConfigRequest>);

    impl CreateDiscoveryConfig {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateDiscoveryConfigRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DiscoveryConfig> {
            (*self.0.stub)
                .create_discovery_config(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateDiscoveryConfigRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [discovery_config][crate::model::CreateDiscoveryConfigRequest::discovery_config].
        ///
        /// This is a **required** field for requests.
        pub fn set_discovery_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DiscoveryConfig>,
        {
            self.0.request.discovery_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [discovery_config][crate::model::CreateDiscoveryConfigRequest::discovery_config].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_discovery_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DiscoveryConfig>,
        {
            self.0.request.discovery_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [config_id][crate::model::CreateDiscoveryConfigRequest::config_id].
        pub fn set_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.config_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateDiscoveryConfig {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_discovery_config][crate::client::DlpService::update_discovery_config] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateDiscoveryConfig;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateDiscoveryConfig {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateDiscoveryConfig(RequestBuilder<crate::model::UpdateDiscoveryConfigRequest>);

    impl UpdateDiscoveryConfig {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateDiscoveryConfigRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DiscoveryConfig> {
            (*self.0.stub)
                .update_discovery_config(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateDiscoveryConfigRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [discovery_config][crate::model::UpdateDiscoveryConfigRequest::discovery_config].
        ///
        /// This is a **required** field for requests.
        pub fn set_discovery_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::DiscoveryConfig>,
        {
            self.0.request.discovery_config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [discovery_config][crate::model::UpdateDiscoveryConfigRequest::discovery_config].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_discovery_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::DiscoveryConfig>,
        {
            self.0.request.discovery_config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateDiscoveryConfigRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateDiscoveryConfigRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateDiscoveryConfig {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_discovery_config][crate::client::DlpService::get_discovery_config] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetDiscoveryConfig;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetDiscoveryConfig {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetDiscoveryConfig(RequestBuilder<crate::model::GetDiscoveryConfigRequest>);

    impl GetDiscoveryConfig {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetDiscoveryConfigRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DiscoveryConfig> {
            (*self.0.stub)
                .get_discovery_config(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetDiscoveryConfigRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetDiscoveryConfig {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_discovery_configs][crate::client::DlpService::list_discovery_configs] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListDiscoveryConfigs;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListDiscoveryConfigs {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListDiscoveryConfigs(RequestBuilder<crate::model::ListDiscoveryConfigsRequest>);

    impl ListDiscoveryConfigs {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListDiscoveryConfigsRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListDiscoveryConfigsResponse> {
            (*self.0.stub)
                .list_discovery_configs(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListDiscoveryConfigsResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListDiscoveryConfigsResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListDiscoveryConfigsRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListDiscoveryConfigsRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListDiscoveryConfigsRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListDiscoveryConfigsRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListDiscoveryConfigs {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_discovery_config][crate::client::DlpService::delete_discovery_config] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteDiscoveryConfig;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteDiscoveryConfig {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteDiscoveryConfig(RequestBuilder<crate::model::DeleteDiscoveryConfigRequest>);

    impl DeleteDiscoveryConfig {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteDiscoveryConfigRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_discovery_config(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteDiscoveryConfigRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteDiscoveryConfig {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_dlp_job][crate::client::DlpService::create_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateDlpJob(RequestBuilder<crate::model::CreateDlpJobRequest>);

    impl CreateDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateDlpJobRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DlpJob> {
            (*self.0.stub)
                .create_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateDlpJobRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [job_id][crate::model::CreateDlpJobRequest::job_id].
        pub fn set_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.job_id = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::CreateDlpJobRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }

        /// Sets the value of [job][crate::model::CreateDlpJobRequest::job].
        ///
        /// Note that all the setters affecting `job` are
        /// mutually exclusive.
        pub fn set_job<T: Into<Option<crate::model::create_dlp_job_request::Job>>>(
            mut self,
            v: T,
        ) -> Self {
            self.0.request.job = v.into();
            self
        }

        /// Sets the value of [job][crate::model::CreateDlpJobRequest::job]
        /// to hold a `InspectJob`.
        ///
        /// Note that all the setters affecting `job` are
        /// mutually exclusive.
        pub fn set_inspect_job<
            T: std::convert::Into<std::boxed::Box<crate::model::InspectJobConfig>>,
        >(
            mut self,
            v: T,
        ) -> Self {
            self.0.request = self.0.request.set_inspect_job(v);
            self
        }

        /// Sets the value of [job][crate::model::CreateDlpJobRequest::job]
        /// to hold a `RiskJob`.
        ///
        /// Note that all the setters affecting `job` are
        /// mutually exclusive.
        pub fn set_risk_job<
            T: std::convert::Into<std::boxed::Box<crate::model::RiskAnalysisJobConfig>>,
        >(
            mut self,
            v: T,
        ) -> Self {
            self.0.request = self.0.request.set_risk_job(v);
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_dlp_jobs][crate::client::DlpService::list_dlp_jobs] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListDlpJobs;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListDlpJobs {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListDlpJobs(RequestBuilder<crate::model::ListDlpJobsRequest>);

    impl ListDlpJobs {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListDlpJobsRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListDlpJobsResponse> {
            (*self.0.stub)
                .list_dlp_jobs(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListDlpJobsResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDlpJobsResponse, gax::error::Error>
        {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListDlpJobsRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListDlpJobsRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListDlpJobsRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListDlpJobsRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [r#type][crate::model::ListDlpJobsRequest::type].
        pub fn set_type<T: Into<crate::model::DlpJobType>>(mut self, v: T) -> Self {
            self.0.request.r#type = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListDlpJobsRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListDlpJobsRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListDlpJobs {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_dlp_job][crate::client::DlpService::get_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetDlpJob(RequestBuilder<crate::model::GetDlpJobRequest>);

    impl GetDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetDlpJobRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::DlpJob> {
            (*self.0.stub)
                .get_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetDlpJobRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_dlp_job][crate::client::DlpService::delete_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteDlpJob(RequestBuilder<crate::model::DeleteDlpJobRequest>);

    impl DeleteDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteDlpJobRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteDlpJobRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::cancel_dlp_job][crate::client::DlpService::cancel_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CancelDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CancelDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CancelDlpJob(RequestBuilder<crate::model::CancelDlpJobRequest>);

    impl CancelDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CancelDlpJobRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .cancel_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::CancelDlpJobRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CancelDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_stored_info_type][crate::client::DlpService::create_stored_info_type] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateStoredInfoType;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateStoredInfoType {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateStoredInfoType(RequestBuilder<crate::model::CreateStoredInfoTypeRequest>);

    impl CreateStoredInfoType {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateStoredInfoTypeRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::StoredInfoType> {
            (*self.0.stub)
                .create_stored_info_type(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateStoredInfoTypeRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [config][crate::model::CreateStoredInfoTypeRequest::config].
        ///
        /// This is a **required** field for requests.
        pub fn set_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::StoredInfoTypeConfig>,
        {
            self.0.request.config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [config][crate::model::CreateStoredInfoTypeRequest::config].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::StoredInfoTypeConfig>,
        {
            self.0.request.config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [stored_info_type_id][crate::model::CreateStoredInfoTypeRequest::stored_info_type_id].
        pub fn set_stored_info_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.stored_info_type_id = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::CreateStoredInfoTypeRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateStoredInfoType {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_stored_info_type][crate::client::DlpService::update_stored_info_type] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateStoredInfoType;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateStoredInfoType {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateStoredInfoType(RequestBuilder<crate::model::UpdateStoredInfoTypeRequest>);

    impl UpdateStoredInfoType {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateStoredInfoTypeRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::StoredInfoType> {
            (*self.0.stub)
                .update_stored_info_type(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateStoredInfoTypeRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [config][crate::model::UpdateStoredInfoTypeRequest::config].
        pub fn set_config<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::StoredInfoTypeConfig>,
        {
            self.0.request.config = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [config][crate::model::UpdateStoredInfoTypeRequest::config].
        pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::StoredInfoTypeConfig>,
        {
            self.0.request.config = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateStoredInfoTypeRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateStoredInfoTypeRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateStoredInfoType {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_stored_info_type][crate::client::DlpService::get_stored_info_type] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetStoredInfoType;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetStoredInfoType {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetStoredInfoType(RequestBuilder<crate::model::GetStoredInfoTypeRequest>);

    impl GetStoredInfoType {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetStoredInfoTypeRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::StoredInfoType> {
            (*self.0.stub)
                .get_stored_info_type(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetStoredInfoTypeRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetStoredInfoType {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_stored_info_types][crate::client::DlpService::list_stored_info_types] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListStoredInfoTypes;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListStoredInfoTypes {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListStoredInfoTypes(RequestBuilder<crate::model::ListStoredInfoTypesRequest>);

    impl ListStoredInfoTypes {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListStoredInfoTypesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListStoredInfoTypesResponse> {
            (*self.0.stub)
                .list_stored_info_types(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListStoredInfoTypesResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListStoredInfoTypesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListStoredInfoTypesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListStoredInfoTypesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListStoredInfoTypesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListStoredInfoTypesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [location_id][crate::model::ListStoredInfoTypesRequest::location_id].
        pub fn set_location_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.location_id = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListStoredInfoTypes {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_stored_info_type][crate::client::DlpService::delete_stored_info_type] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteStoredInfoType;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteStoredInfoType {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteStoredInfoType(RequestBuilder<crate::model::DeleteStoredInfoTypeRequest>);

    impl DeleteStoredInfoType {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteStoredInfoTypeRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_stored_info_type(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteStoredInfoTypeRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteStoredInfoType {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_project_data_profiles][crate::client::DlpService::list_project_data_profiles] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListProjectDataProfiles;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListProjectDataProfiles {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListProjectDataProfiles(
        RequestBuilder<crate::model::ListProjectDataProfilesRequest>,
    );

    impl ListProjectDataProfiles {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListProjectDataProfilesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListProjectDataProfilesResponse> {
            (*self.0.stub)
                .list_project_data_profiles(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<
            crate::model::ListProjectDataProfilesResponse,
            gax::error::Error,
        > {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListProjectDataProfilesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListProjectDataProfilesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListProjectDataProfilesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListProjectDataProfilesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListProjectDataProfilesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListProjectDataProfilesRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListProjectDataProfiles {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_table_data_profiles][crate::client::DlpService::list_table_data_profiles] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListTableDataProfiles;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListTableDataProfiles {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListTableDataProfiles(RequestBuilder<crate::model::ListTableDataProfilesRequest>);

    impl ListTableDataProfiles {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListTableDataProfilesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListTableDataProfilesResponse> {
            (*self.0.stub)
                .list_table_data_profiles(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListTableDataProfilesResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListTableDataProfilesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListTableDataProfilesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListTableDataProfilesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListTableDataProfilesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListTableDataProfilesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListTableDataProfilesRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListTableDataProfiles {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_column_data_profiles][crate::client::DlpService::list_column_data_profiles] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListColumnDataProfiles;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListColumnDataProfiles {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListColumnDataProfiles(RequestBuilder<crate::model::ListColumnDataProfilesRequest>);

    impl ListColumnDataProfiles {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListColumnDataProfilesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListColumnDataProfilesResponse> {
            (*self.0.stub)
                .list_column_data_profiles(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<
            crate::model::ListColumnDataProfilesResponse,
            gax::error::Error,
        > {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListColumnDataProfilesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListColumnDataProfilesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListColumnDataProfilesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListColumnDataProfilesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListColumnDataProfilesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListColumnDataProfilesRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListColumnDataProfiles {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_project_data_profile][crate::client::DlpService::get_project_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetProjectDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetProjectDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetProjectDataProfile(RequestBuilder<crate::model::GetProjectDataProfileRequest>);

    impl GetProjectDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetProjectDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ProjectDataProfile> {
            (*self.0.stub)
                .get_project_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetProjectDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetProjectDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_file_store_data_profiles][crate::client::DlpService::list_file_store_data_profiles] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListFileStoreDataProfiles;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListFileStoreDataProfiles {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListFileStoreDataProfiles(
        RequestBuilder<crate::model::ListFileStoreDataProfilesRequest>,
    );

    impl ListFileStoreDataProfiles {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListFileStoreDataProfilesRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListFileStoreDataProfilesResponse> {
            (*self.0.stub)
                .list_file_store_data_profiles(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<
            crate::model::ListFileStoreDataProfilesResponse,
            gax::error::Error,
        > {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<
            crate::model::ListFileStoreDataProfilesResponse,
            gax::error::Error,
        > {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListFileStoreDataProfilesRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListFileStoreDataProfilesRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListFileStoreDataProfilesRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [order_by][crate::model::ListFileStoreDataProfilesRequest::order_by].
        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.order_by = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListFileStoreDataProfilesRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListFileStoreDataProfiles {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_file_store_data_profile][crate::client::DlpService::get_file_store_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetFileStoreDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetFileStoreDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetFileStoreDataProfile(
        RequestBuilder<crate::model::GetFileStoreDataProfileRequest>,
    );

    impl GetFileStoreDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetFileStoreDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::FileStoreDataProfile> {
            (*self.0.stub)
                .get_file_store_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetFileStoreDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetFileStoreDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_file_store_data_profile][crate::client::DlpService::delete_file_store_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteFileStoreDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteFileStoreDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteFileStoreDataProfile(
        RequestBuilder<crate::model::DeleteFileStoreDataProfileRequest>,
    );

    impl DeleteFileStoreDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteFileStoreDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_file_store_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteFileStoreDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteFileStoreDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_table_data_profile][crate::client::DlpService::get_table_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetTableDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetTableDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetTableDataProfile(RequestBuilder<crate::model::GetTableDataProfileRequest>);

    impl GetTableDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetTableDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::TableDataProfile> {
            (*self.0.stub)
                .get_table_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetTableDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetTableDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_column_data_profile][crate::client::DlpService::get_column_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetColumnDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetColumnDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetColumnDataProfile(RequestBuilder<crate::model::GetColumnDataProfileRequest>);

    impl GetColumnDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetColumnDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ColumnDataProfile> {
            (*self.0.stub)
                .get_column_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetColumnDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetColumnDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_table_data_profile][crate::client::DlpService::delete_table_data_profile] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteTableDataProfile;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteTableDataProfile {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteTableDataProfile(RequestBuilder<crate::model::DeleteTableDataProfileRequest>);

    impl DeleteTableDataProfile {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteTableDataProfileRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_table_data_profile(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteTableDataProfileRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteTableDataProfile {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::hybrid_inspect_dlp_job][crate::client::DlpService::hybrid_inspect_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::HybridInspectDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> HybridInspectDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct HybridInspectDlpJob(RequestBuilder<crate::model::HybridInspectDlpJobRequest>);

    impl HybridInspectDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::HybridInspectDlpJobRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::HybridInspectResponse> {
            (*self.0.stub)
                .hybrid_inspect_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::HybridInspectDlpJobRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [hybrid_item][crate::model::HybridInspectDlpJobRequest::hybrid_item].
        pub fn set_hybrid_item<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::HybridContentItem>,
        {
            self.0.request.hybrid_item = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [hybrid_item][crate::model::HybridInspectDlpJobRequest::hybrid_item].
        pub fn set_or_clear_hybrid_item<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::HybridContentItem>,
        {
            self.0.request.hybrid_item = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for HybridInspectDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::finish_dlp_job][crate::client::DlpService::finish_dlp_job] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::FinishDlpJob;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> FinishDlpJob {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct FinishDlpJob(RequestBuilder<crate::model::FinishDlpJobRequest>);

    impl FinishDlpJob {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::FinishDlpJobRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .finish_dlp_job(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::FinishDlpJobRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for FinishDlpJob {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::create_connection][crate::client::DlpService::create_connection] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::CreateConnection;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> CreateConnection {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);

    impl CreateConnection {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::Connection> {
            (*self.0.stub)
                .create_connection(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [parent][crate::model::CreateConnectionRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [connection][crate::model::CreateConnectionRequest::connection].
        ///
        /// This is a **required** field for requests.
        pub fn set_connection<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::Connection>,
        {
            self.0.request.connection = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [connection][crate::model::CreateConnectionRequest::connection].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::Connection>,
        {
            self.0.request.connection = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for CreateConnection {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::get_connection][crate::client::DlpService::get_connection] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::GetConnection;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> GetConnection {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);

    impl GetConnection {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::Connection> {
            (*self.0.stub)
                .get_connection(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::GetConnectionRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for GetConnection {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::list_connections][crate::client::DlpService::list_connections] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::ListConnections;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> ListConnections {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);

    impl ListConnections {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
            (*self.0.stub)
                .list_connections(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::ListConnectionsResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<crate::model::ListConnectionsResponse, gax::error::Error>
        {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::ListConnectionsRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::ListConnectionsRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::ListConnectionsRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::ListConnectionsRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for ListConnections {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::search_connections][crate::client::DlpService::search_connections] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::SearchConnections;
    /// # tokio_test::block_on(async {
    /// use gax::paginator::ItemPaginator;
    ///
    /// let builder = prepare_request_builder();
    /// let mut items = builder.by_item();
    /// while let Some(result) = items.next().await {
    ///   let item = result?;
    /// }
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> SearchConnections {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct SearchConnections(RequestBuilder<crate::model::SearchConnectionsRequest>);

    impl SearchConnections {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::SearchConnectionsRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::SearchConnectionsResponse> {
            (*self.0.stub)
                .search_connections(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Streams each page in the collection.
        pub fn by_page(
            self,
        ) -> impl gax::paginator::Paginator<crate::model::SearchConnectionsResponse, gax::error::Error>
        {
            use std::clone::Clone;
            let token = self.0.request.page_token.clone();
            let execute = move |token: String| {
                let mut builder = self.clone();
                builder.0.request = builder.0.request.set_page_token(token);
                builder.send()
            };
            gax::paginator::internal::new_paginator(token, execute)
        }

        /// Streams each item in the collection.
        pub fn by_item(
            self,
        ) -> impl gax::paginator::ItemPaginator<crate::model::SearchConnectionsResponse, gax::error::Error>
        {
            use gax::paginator::Paginator;
            self.by_page().items()
        }

        /// Sets the value of [parent][crate::model::SearchConnectionsRequest::parent].
        ///
        /// This is a **required** field for requests.
        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.parent = v.into();
            self
        }

        /// Sets the value of [page_size][crate::model::SearchConnectionsRequest::page_size].
        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
            self.0.request.page_size = v.into();
            self
        }

        /// Sets the value of [page_token][crate::model::SearchConnectionsRequest::page_token].
        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.page_token = v.into();
            self
        }

        /// Sets the value of [filter][crate::model::SearchConnectionsRequest::filter].
        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.filter = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for SearchConnections {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::delete_connection][crate::client::DlpService::delete_connection] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::DeleteConnection;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> DeleteConnection {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);

    impl DeleteConnection {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<()> {
            (*self.0.stub)
                .delete_connection(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::DeleteConnectionRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for DeleteConnection {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }

    /// The request builder for [DlpService::update_connection][crate::client::DlpService::update_connection] calls.
    ///
    /// # Example
    /// ```no_run
    /// # use google_cloud_privacy_dlp_v2::builder;
    /// use builder::dlp_service::UpdateConnection;
    /// # tokio_test::block_on(async {
    ///
    /// let builder = prepare_request_builder();
    /// let response = builder.send().await?;
    /// # gax::Result::<()>::Ok(()) });
    ///
    /// fn prepare_request_builder() -> UpdateConnection {
    ///   # panic!();
    ///   // ... details omitted ...
    /// }
    /// ```
    #[derive(Clone, Debug)]
    pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);

    impl UpdateConnection {
        pub(crate) fn new(
            stub: std::sync::Arc<dyn super::super::stub::dynamic::DlpService>,
        ) -> Self {
            Self(RequestBuilder::new(stub))
        }

        /// Sets the full request, replacing any prior values.
        pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
            mut self,
            v: V,
        ) -> Self {
            self.0.request = v.into();
            self
        }

        /// Sets all the options, replacing any prior values.
        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
            self.0.options = v.into();
            self
        }

        /// Sends the request.
        pub async fn send(self) -> Result<crate::model::Connection> {
            (*self.0.stub)
                .update_connection(self.0.request, self.0.options)
                .await
                .map(gax::response::Response::into_body)
        }

        /// Sets the value of [name][crate::model::UpdateConnectionRequest::name].
        ///
        /// This is a **required** field for requests.
        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
            self.0.request.name = v.into();
            self
        }

        /// Sets the value of [connection][crate::model::UpdateConnectionRequest::connection].
        ///
        /// This is a **required** field for requests.
        pub fn set_connection<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<crate::model::Connection>,
        {
            self.0.request.connection = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [connection][crate::model::UpdateConnectionRequest::connection].
        ///
        /// This is a **required** field for requests.
        pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<crate::model::Connection>,
        {
            self.0.request.connection = v.map(|x| x.into());
            self
        }

        /// Sets the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
        pub fn set_update_mask<T>(mut self, v: T) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = std::option::Option::Some(v.into());
            self
        }

        /// Sets or clears the value of [update_mask][crate::model::UpdateConnectionRequest::update_mask].
        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
        where
            T: std::convert::Into<wkt::FieldMask>,
        {
            self.0.request.update_mask = v.map(|x| x.into());
            self
        }
    }

    #[doc(hidden)]
    impl gax::options::internal::RequestBuilder for UpdateConnection {
        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
            &mut self.0.options
        }
    }
}
